#include<bits/stdc++.h>
using namespace std;

class Solution {
public:
    int prefixCount(vector<string>& words, string pref) {
        int ans = 0;
        for(int i = 0; i < words.size(); i++){
            if(words[i].length() < pref.length())continue;
            for(int j = 0; j < pref.length(); j++){
                if(words[i][j] != pref[j])break;
                if(j == pref.length() - 1)ans++;
            }
        }   
        return ans;   
    }
};

/**
 * @brief 2022.2.28
 * 周赛
 */